package com.stm.bi.web;

import com.stm.bi.dto.query.RegionalSaleQry;
import com.stm.bi.dto.vo.RegionalWeatherVO;
import com.stm.bi.model.Chart;
import com.stm.bi.service.MacroeconomicDataService;
import com.stm.framework.annotation.Module;
import com.stm.framework.annotation.RestApi;
import com.stm.framework.dto.Response;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 *
 *
 * @author zhongjiufu
 * @date 2024-12-09
 */
@RestController
@RequestMapping("/macroscopic/data")
@Module("宏观数据")
public class MacroeconomicDataController {

    @Resource
    private MacroeconomicDataService macroeconomicDataService;
    @GetMapping(value = "/regionalTemperatureHumidity")
    @RestApi(name = "宏观数据--温度湿度", author = "zjf", idx = 1, permission = "plan:performance:query")
    public Response<RegionalWeatherVO> regionalTemperatureHumidity(RegionalSaleQry regionalSaleQry) {
        return macroeconomicDataService.regionalTemperatureHumidity(regionalSaleQry);
    }

    @GetMapping(value = "/provinceTemperatureHumidity")
    @RestApi(name = "宏观数据--省全年温湿度", author = "zjf", idx = 2, permission = "plan:performance:query")
    public Response<Chart> provinceTemperatureHumidity(RegionalSaleQry regionalSaleQry) {
        return macroeconomicDataService.provinceTemperatureHumidity(regionalSaleQry);
    }

    @GetMapping(value = "/capitalTemperatureHumidity")
    @RestApi(name = "宏观数据--省会城市全年温湿度", author = "zjf", idx = 3, permission = "plan:performance:query")
    public Response<Chart> capitalTemperatureHumidity(RegionalSaleQry regionalSaleQry) {
        return macroeconomicDataService.capitalTemperatureHumidity(regionalSaleQry);
    }

    @GetMapping(value = "/regionalWeatherMap")
    @RestApi(name = "温差分布", author = "zjf", idx = 3, permission = "plan:performance:query")
    public Response<Chart> regionalWeatherMap(RegionalSaleQry regionalSaleQry) {
        return macroeconomicDataService.regionalWeatherMap(regionalSaleQry);
    }
}
